<script setup>
import {ref} from "vue";

const showInfo = () => {
  console.log("我是App的子组件son")
}
const count=ref(0)
// 子组件在其中通过 defineExpose 宏显式暴露，父组件能够通过ref访问
defineExpose({
  showInfo,
  count
})
</script>

<template>
  <div class="son"></div>
</template>

<style scoped lang="less">

</style>